package com.yhsoft.bill.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yhsoft.bill.controller.response.SysYckLogOutVo;
import com.yhsoft.bill.controller.response.SysYszkOutVo;
import com.yhsoft.bill.entity.SysYszk;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;

/**
 * <p>
 * 平台应收账款 Mapper 接口
 * </p>
 *
 * @author yyyyyyyh
 * @since 2023-11-03
 */
public interface SysYszkMapper extends BaseMapper<SysYszk> {

    IPage<SysYszkOutVo> getYszkList(IPage<SysYszkOutVo> page, @Param("ew") Wrapper wrapper);

    IPage<SysYckLogOutVo> getListPageByConditions(IPage<SysYckLogOutVo> page, @Param("ew") Wrapper wrapper);

    @Select("select sum(total_ys_amount) AS total_ys_amount from bill_sys_yszk")
    BigDecimal getTotalYsAmount();

    @Select("select sum(total_pay_amount) AS total_pay_amount from bill_sys_yszk")
    BigDecimal getTotalPayAmount();
}
